﻿using System;

namespace Restful.Net
{
    /// <summary>
    /// Implementation of this is used by the framework to instantiate the rest services needed.
    /// Is meant to be implemented so it will fit nicely into any kind of IOC pattern that is being used, since
    /// the framework will just call the method GetInstance method to instantiate the service.
    /// </summary>
    public interface IServiceFactory
    {
        /// <summary>
        /// Gets the instance of the given service type.
        /// </summary>
        /// <param name="serviceType">Type of the service.</param>
        /// <returns>Rest service object instantiated and ready to go.</returns>
        object GetInstance(Type serviceType);
    }
}
